from rest_framework import serializers
from .models import Staff
# Serializers define the API representation.


class StaffSerializer(serializers.HyperlinkedModelSerializer):
    # code = serializers.SerializerMethodField()


    class Meta:
        model = Staff
        fields = ('url', 'surname', 'forename', 'identity', 'gender',
                  'brith_date', 'phone', 'email', 'address', 'emergency_contact')

    # def get_code(self, obj):
    #     return obj.code
